/**
 * 将列表code字段转换为展示name
 * let filter = {
 *      status: {
 *          1: '启用',
 *          2: '停用'
 *      }
 * }
 * 
 * 
 * */ 

export const columnNmae = (list, filter) => {
    list.forEach(element => {
        for(let i in filter) {
            for(let child in filter[i]) {
                if(element[i] == child) {
                    element[i + 'Name'] = filter[i][child]
                }   
            }
        }
    });
    return list
}
